<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="com.ja.domain.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
	<head>
		<title>开奖记录</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<link rel="stylesheet" href="/css/style.css" />
		<style>
			.qiu0{background: #D8D21C!important;}
			.qiu1{background: #D8D21C!important;}
			.qiu2{background: #3273F9!important;}
			.qiu3{background: #515567!important;}
			.qiu4{background: #E6962D!important;}
			.qiu5{background: #0EC2C4!important;}
			.qiu6{background: #2D35D0!important;}
			.qiu7{background: #AEAFC5!important;}
			.qiu8{background: #E63131!important;}
			.qiu9{background: #7C1F1F!important;}
			.qiu10{background: #2DCC21!important;}
			.xg1,.xg2,.xg7,.xg8,.xg01,.xg02,.xg07,.xg08,.xg12,.xg13,.xg18,.xg19,.xg23,.xg24,.xg29,.xg30,.xg34,.xg35,.xg40,.xg45,.xg46{background:#F02828!important;}
			.xg16,.xg17,.xg21,.xg22,.xg27,.xg28,.xg32,.xg33,.xg38,.xg39,.xg43,.xg44,.xg49,.xg5,.xg6,.xg05,.xg06,.xg11{background:#09B832!important;}
			.xg3,.xg4,.xg03,.xg04,.xg09,.xg9,.xg10,.xg14,.xg15,.xg20,.xg25,.xg26,.xg31,.xg36,.xg37,.xg41,.xg42,.xg47,.xg48{background:#336DCC!important;}
			
			*{font-size: 16px;font-family: "微软雅黑"}
			.gray{color:gray;font-weight: lighter;}
			.not1{color: red!important;font-size: 14px!important;margin-top: 10px;position: absolute;left:74px;}
			* {
			user-select: none; -webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;
			}
			.cai2{margin-top: 0px;}
			.cai2 li{margin-top: 22px; height: 62px;border-top: 1px solid #f0f0f0;padding-top: 6px;}
			.cai2 img{width: 55px;height: 55px;margin:4px 10px 0px 0px;}
			.cai2 .not{left: 80px;position: absolute;margin-top:10px;}
			.cai2 .djs,.cai2 .qishu{right: 10px;position: absolute;}
			.djs{margin-top: 8px;color: red;font-weight: bold;}
			.cai2 .br{display: none;}
			.cai2 img,.cai2 .name,.cai2{float: left;}
			.qiu{margin:1px;color:white;width:0.46rem;height:0.46rem;line-height:0.46rem;font-size:0.28rem;display:inline-block;background: #E63131;border-radius:50%;}
			.shengxiao{margin:1px;color:black;width:0.46rem;height:0.46rem;line-height:0.46rem;font-size:0.28rem;display:inline-block;border-radius:50%;}
			#cai .cz, .nav1 select, #hhh {
				cursor: pointer;
			}
			.cai2 li:first-child {
				border-top:none;
			}			
			/* .c-span-lastPeriod {
				font-size:13px!important;
			} */
			.zhengzaikaijiang {
				background-color:red;
				margin:1px;
				color:white;
				width:0.46rem;
				height:0.46rem;
				line-height:0.46rem;
				font-size:0.33rem;
				display:inline-block;
				border-radius: 20px;
			}
			[data-cname='bjl'] {
				position: relative;
			}
			[data-cname='bjl'] .qishu, [data-cname='bjl'] .not1, [data-cname='bjl'] .djs {
				visibility: hidden;
			}
			[data-cname='bjl'] .not {
				font-size:12px;
				color:red;
				font-weight:bold;
				left:70px;
				text-align: left;
				bottom:4px;
			}
			.xg6hc .djs {
				display:none;
			}
			 .c-span-nextPeriod {
				font-size:13px!important;
			} 
			.clearfix:after {
				content:"";
				display:block;
				clear:both;
			}
			.span-c-placeholder {
				color:white;
			}
			.span-c-nextPeriodStatus {
				font-size:13px;
				color:red;
			}
			.green{border-radius:10px; border:1px solid silver ;box-shadow: 2px 3px 1px silver;padding:10px;padding-left:10px; ;line-height:30px;margin-bottom: 20px;text-align: left;}
			.green{border-top:5px solid green;}
			.span-item-circle {
				display: inline-flex;
			    background: red;
			    margin: 1px;
			    border-radius: 50%;
			    color: white;
				font-size: 0.33rem;
			    width: 0.46rem;
			    height: 0.46rem;
			    justify-content:center;
			    align-items:center;
			    max-width:26px;
			    max-height:26px;
			}
			.hezhi{margin-top: 12px;display: inline-block;position: absolute;left:3.8rem;z-index:10;}
			.hezhi1{margin-left: 1rem;}
			/* .name,.c-span-lastPeriod,.gray{font-size:13px!important;} */
			.shaizi{
				display:block;
				float:left;
				margin-right:10px;
				width: 0.56rem;
    			height: 0.56rem;
    			margin-top: 3px;
			}
		</style>
	</head>
	<body>
	<div id="loading" class="kd-loading">
	<div class="kd-spinner">
		<span class="bounce b1"></span>
		<span class="bounce b2"></span>
		<span class="bounce b3"></span>
	</div>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>请稍等，努力加载中...</p>
</div>
<div class='wapper' style="display:none">
		<div class="bg-theme col-xs-12 col-sm-4 col-sm-offset-4 text-center top" stlye="padding-left:10px;padding-right:10px;">
			<!-- <a onclick="back()" class="glyphicon glyphicon-chevron-left fl" style="cursor:pointer; color: white;position:absolute;top:50%;transform:translateY(-50%);font-size: 20px;left:10px;"></a> -->
			<span style="font-weight:700;">开奖大厅</span>
		</div>
		<div id="cai" class="col-xs-12 col-sm-4 col-sm-offset-4 text-center body cai2" style="padding: 28px 10px 60px 10px;">
			<% 
				String date=new SimpleDateFormat("yyyy-MM-dd").format(new Date());
				pageContext.setAttribute("date", date);
			%>
			<c:forEach items="${list }" var="l" varStatus="i" >
				<c:if test="${!l.cname.contains('bjl')&&!l.cname.contains('zc')}">
					<li data-nogetindex="0" data-cname='${l.cname }' class='${l.classt } cz${i.index+1 } clearfix a-i-lotterRecord'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name' style="margin-top: 5px;font-weight: bold;">${l.name } <span class="gray">第</span><span class="c-span-lastPeriod gray ${l.cname }lastPeriod">${l.period}</span><span class="gray">期</span> <span class="gray ${l.cname }time">${l.lottertime.substring(11,19) }</span></span>
						<br class='br1'>
						
						<span class='not1 ${l.cname }lotternumber' style="float:left;color:red;">${l.lotternumber }</span>
						<c:if test="${l.cname.contains('k3')}">
							<span class="hezhi">${l.playResult }</span>
						</c:if>	
						<c:if test="${l.cname.contains('ssc')}">
							<span class="hezhi hezhi1">${l.playResult }</span>
						</c:if>	
						<c:if test="${l.cname.contains('6hc')}">
							<br><span style="margin-top: 10px;position: absolute;left:74px" class="xg6hc1"></span>
						</c:if>	
						<br>
						<span class='not gray'>
						</span>
						<br>
						<span hidden="" id="ts${i.index+1 }" >${l.timespace }</span>
					</li>
				</c:if>	
			</c:forEach>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4 text-center foot">
			<iframe src="f.jsp"></iframe>
		</div>
		<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:90vw;max-width:600px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel" style="text-align: center;letter-spacing: 3px;"></h4>
            </div>
            <div class="modal-body" style="height:65vh;overflow:auto;">
 				
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">关　闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
</div>
	</body>
	<script type="text/javascript" src="/js/lotterHelper.js"></script>
	<script>
	 document.onreadystatechange = function(){ 
		　　 if(document.readyState == "complete"){ 　　//当页面加载状态为完全结束时进入 
		    　 //你要做的操作。
			 $(".wapper").show() 
			 $(".kd-loading").hide()
		   　 }
		}
	//判断是否是iphone5
	console.log(navigator.userAgent);
	var width=$("#cai").width()
	if(width<=300){
		$(".name").css("font-size","12px")
		$(".c-span-lastPeriod").css("font-size","12px")
		$(".gray").css("font-size","12px")
	}else{
		$(".name").css("font-size","13px")
		$(".c-span-lastPeriod").css("font-size","13px")
		$(".gray").css("font-size","13px")
	}
	$(".a-i-lotterRecord").click(function(){
		window.location.href="/kaijiangjilu.do?cname="+$(this).attr("class").split(" ")[0]
	})
		!function() {
	 		
	 		startCaiZhongDaoJiShi()
			setInterval(startCaiZhongDaoJiShi, 7000);
			jianrong()
			$(function(){
				$(".nav1 select").change(function(){
					var cla=$(".nav1 select").val();
					$(".cz").addClass("hidden");
					$("."+cla).removeClass("hidden");
				});
			});
			function startCaiZhongDaoJiShi(liItem, type) {
				var $li1 = liItem
				ajax({
					url: "/syLotterr.do",
					type:'post',
					data:{},
					success:function(data){
						var json=eval('('+data+')')
						var timeSpace = json.data.timespace
						var qihao = json.data.period
						for(var j = 0;j<json.data.length;j++){
							var item = json.data[j]
							var $nextPeriod = $("."+item.cname+"lastPeriod").text(item.period)
							/* var $nextPeriod = $("."+item.cname+"time").text(item.lottertime.split(" ")[1])	 */
							var d = item.lotternumber.split(",")
							var x = "";
							 for(var i=0;i<d.length-1;i++){
								if(item.cname=="bjpk10"||item.cname=="2fpk10"||item.cname=="xyft"||item.cname=="xysm"){
									x+="<span class='qiu qiu"+Number(d[i])+"'>"+d[i]+"</span>"
								}else if(item.cname=="xg6hc" || item.cname=="5f6hc"){
									if(i==d.length-2){
										x+="<span style='font-size:16px;font-weight:bold;color:black'>+</span>";
									}
									x+="<span class='qiu xg"+Number(d[i])+"'>"+d[i]+"</span>"
								} else if(item.cname=="ahk3" || item.cname=="gxk3" || item.cname=="jsk3" || item.cname=="3fk3" || item.cname=="bjk3"){
									x+="<span class='shaizi sz"+d[i]+"'></span>"
								} else if(item.cname=="gdkl10f" || item.cname=="cqkl10f"){
									x+="<span class='klsf sg"+d[i]+"'></span>"
								}else if(item.cname == 'xg6hc' || item.cname == '5f6hc'){
									if(i==d.length-2){
										x1+="<span style='font-size:16px;font-weight:bold;color:black'>+</span>";
									}
									x1+="<span class='shengxiao'>"+d[i]+"</span>"
									if (blueArr.indexOf(d[i]) != -1) {
										xg6hcBackGround = "style='background-color:#336DCC;'"
									}
									else if (greenArr.indexOf(d[i]) != -1) {
										xg6hcBackGround = "style='background-color:#09B832;'"
									}	
								}else{
									x+="<span class='qiu'>"+d[i]+"</span>"
								}
							} 
						 	$("."+item.cname+"lotternumber").html("")
							$("."+item.cname+"lotternumber").html(x) 
						}
					},
				})
			}
			var allLiItems = $("#cai li")
			for (var i = 0; i < allLiItems.length; i++) {
				var item = allLiItems[i]
				if (item.dataset.cname == "bjl") {
					$(item).find(".not").html("在线百家乐，30秒一期，好玩又刺激!<br>最高中奖10万人民币！")
				}
			}
			stopUserScaleScreenIOS()
		}.call() 
	</script>
</html>
